﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SMTC.Model.Domain;
using SMTC.Model.Model;
using SMTC.BO.BU;
/// <summary>
/// Summary description for BUViewDataSource
/// </summary>
public class BUViewDataSource
{
	public BUViewDataSource()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    private BUQueryServices _services = new BUQueryServices();

    public List<SMT_BUModel> Select(string BUName,  string ModifyPerson,   string startTime, string endTime,string sel)
    {
        DateTime startTime1 = Convert.ToDateTime(startTime);
        DateTime endTime1 = Convert.ToDateTime(endTime);
        if (sel == "1")
        {
            return _services.GetBUListForSelect(BUName, ModifyPerson, startTime1, endTime1);
        }
        else
        {
            return _services.GetBUList(BUName, ModifyPerson, startTime1, endTime1);
        }
    }
}